<template>
  <div>
    <!-- 三级联动全局组件：已经注册为全局组件，因此不需要再引入 -->
    <TypeNav></TypeNav>
    <ListContainer></ListContainer>
    <Recommend></Recommend>
    <Rank></Rank>
    <Like></Like>
    <Floor v-for="(floor) in floorList" :key="floor.id" :list="floor"></Floor>
    <Brand></Brand>
  </div>
</template>

<script>
import ListContainer from "@/pages/MyHome/ListContainer";
import Recommend from "@/pages/MyHome/Recommend";
import Rank from "@/pages/MyHome/Rank";
import Like from "@/pages/MyHome/Like";
import Floor from "@/pages/MyHome/Floor";
import Brand from "@/pages/MyHome/Brand";
import { mapState } from "vuex";
export default {
  name:'HomeVue',
  components: { ListContainer, Recommend, Rank, Like, Floor, Brand },
  mounted(){
    this.$store.dispatch('getFloorList')
  },
  
  computed:{
    ...mapState({
      floorList:(state)=>state.Home.floorList
    })
  }
};
</script>

<style></style>
